Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latex completion in string, fix #8983 #8989

Merged
merged 1 commit into from
Nov 19, 2014

Conversation

dhoegh
Copy link
Contributor

@dhoegh dhoegh commented Nov 11, 2014

This enables Latex completion in strings as suggested in #8983.
This pull request fixes the mess in #8988.

@stevengj
Copy link
Member

Sounds good to me.

nolta added a commit that referenced this pull request Nov 19, 2014
@nolta nolta merged commit d68c42a into JuliaLang:master Nov 19, 2014
@tkelman
Copy link
Contributor

tkelman commented Nov 24, 2014

@dhoegh would it be possible to disable the latex completion in circumstances where path completion is also running? There's a bit of a confusing conflict with Windows paths here:

|__/                   |  i686-w64-mingw32
julia> cd("D:\\U
\UUparrow      \UpEquilibrium  \Updownarrow    \Uuparrow
\UpArrowBar    \Uparrow        \Upsilon

when I don't have any folders under D:\ that begin with U. It seems like it would be better to not show any completions in this particular case if it's easy to tell when you're doing both string and path completion.

@dhoegh
Copy link
Contributor Author

dhoegh commented Nov 24, 2014

I have noticed it and it is a bit annoying. I think the solution is to disable it when two adjacent backslashes is present. This can be done by changing this https://github.com/JuliaLang/julia/blob/master/base/REPLCompletions.jl#L168 to a regex similar to https://github.com/JuliaLang/julia/blob/master/base/REPLCompletions.jl#L190. Do you think this is the solution then I will make a pull later today?

@tkelman
Copy link
Contributor

tkelman commented Nov 24, 2014

Sounds like it's worth a try, you understand this part of the code much better than I do. I'm not sure where/how many times things get escaped as they make their way through the completion code, but I can try out whatever you propose.

@dhoegh
Copy link
Contributor Author

dhoegh commented Nov 24, 2014

I think it is double escaped but I can fix it later today my solution would be insert somthing like:

1<slashpos && !string[slashpos-1]=='\\'

at https://github.com/JuliaLang/julia/blob/master/base/REPLCompletions.jl#L169 i will check it later.

JeffBezanson added a commit that referenced this pull request Nov 30, 2014
@dhoegh dhoegh deleted the Latex_completion_string branch January 13, 2015 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants